home *** CD-ROM | disk | FTP | other *** search
/ Risc World 3 / Risc World 3.iso / SOFTWARE / ISSUE4 / ZAP / !Zap / Modules / !ZapJRF / Scripts / !ReadMe next >
Text File  |  2002-05-08  |  6KB  |  114 lines

  1. !ReadMe for programming stuff
  2. =============================
  3.  
  4. This file relates to the contents of the 'BASIC' and 'C'  directories.
  5.  
  6. Purpose
  7. -------
  8. Provide an editing environment which :
  9.   a) is slightly more consistant (it's a little like TWIN :-) )
  10.   b) looks like StrongEd's focal point moving insertions
  11.   c) is more fun, and something else to swear at
  12.  
  13.  
  14. Installation
  15. ------------
  16. Add the data at the bottom to the Keys file.
  17. Add the Scripts directory to the real scripts directory.
  18.  
  19.  
  20. Usage
  21. -----
  22. In C mode :
  23.   Shift-Home will trigger the special automated functions, with the following
  24.   keys -
  25.     E = 'if () {} else {}' structure. Return moves you to the true part.
  26.     I = 'if () {}' structure. Return moves you to the true part.
  27.     S = 'switch () { case }' structure. Return moves you to the case value,
  28.         second return moves you to the case action.
  29.     W = 'while () {}' structure. Return moves you to the iterated section.
  30.  
  31. In Basic mode :
  32.   Shift-Home will trigger the special automated functions, with the following
  33.   keys -
  34.     C = 'CASE WHEN' structure. Return moves to the when value, second moves
  35.         you to the action.
  36.     E = 'IF THEN ELSE ENDIF' structure. Return moves you to the true part.
  37.     I = 'IF THEN ENDIF' structure. Return moves you to the true part.
  38.     F = 'DEFFN' structure. No return effect
  39.     P = 'DEFPROC' structure. No return effect
  40.     R = 'REPEAT UNTIL' structure. No return effect
  41.     W = 'WHILE ENDWHILE' structure. Return moves you to the iterated section.
  42.  
  43. In a moving focus section (when return would move you elsewhere), Escape and
  44. keypad Enter will cancel immediately. Left/right work, Shift-left/right work,
  45. Ctrl-left/right work (but restrict you to the bracket you are in, if any),
  46. Ctrl-C to copy a region works, delete works, normal keys work. Any special
  47. functions are disabled until we drop back to normal mode.
  48.  
  49.  
  50. Note
  51. ----
  52. I've used all the 'old-style' commands here rather than the more useful
  53. new extensions. Why ? Because I'm still using Beta 3 zap structure, with
  54. a beta 6 Zap module (and a beta 8 mode4 compiled in). I've not had chance
  55. to upgrade yet. As such, these commands might be better written. However,
  56. it would be nice if these extensions were available to people in case they
  57. are interested in them.
  58.  
  59. Yes, I've based it on TWIN. I just couldn't help it. I saw the groovey
  60. feature and thought - 'hey, cool'. I have some similar macros for function
  61. headers and such like, but this is nicer and also allows you to jump around
  62. the text a little more, making it slightly more intuitive.
  63.  
  64.  
  65. For the Keys file :
  66. -------------------
  67.  
  68. --8<--------
  69. sHOME        &11E    KEYMAP 7
  70.  
  71. Justin Fletcher's Structure maps (Based on, of all things, TWIN) :
  72. Structures      &407    &040    &090    Programming structures
  73. Jump block      &408    &000    &1FF    Jump in and out of blocks
  74.  
  75. 7: Programming structures
  76.  
  77. c               &70063  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Case"":BASEMAP 8"
  78. C               &70043  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Case"":BASEMAP 8"
  79. e               &70065  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Else"":BASEMAP 8":MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.Else"":BASEMAP 8"
  80. E               &70045  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Else"":BASEMAP 8":MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.Else"":BASEMAP 8"
  81. i               &70069  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.If"":BASEMAP 8":MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.If"":BASEMAP 8"
  82. I               &70049  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.If"":BASEMAP 8":MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.If"":BASEMAP 8"
  83. f               &70066  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Func"""
  84. F               &70046  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Func"""
  85. p               &70070  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Proc"""
  86. P               &70050  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Proc"""
  87. r               &70072  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Repeat"""
  88. R               &70052  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.Repeat"""
  89. s               &70073  MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.Switch"":BASEMAP 8"
  90. S               &70053  MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.Switch"":BASEMAP 8"
  91. w               &70077  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.While"":BASEMAP 8":MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.While"":BASEMAP 8"
  92. W               &70057  MJE_IFMODE "BASIC:RUNSCRIPT ""<ZapScripts$Dir>.Basic.While"":BASEMAP 8":MJE_IFMODE "C:RUNSCRIPT ""<ZapScripts$Dir>.C.While"":BASEMAP 8"
  93.  
  94. 8: Jump blocks - these prevent you moving out of the block until you hit return.
  95.                  escape and keypad enter will kill this entry mode dead.
  96.                  If you hit return, you will be moved to the next ¤ (or $$ in
  97.                  BASIC mode) and if the next symbol is not the same you will
  98.                  drop back to 'normal' editing mode.
  99. cC        &80003    COPYSEL
  100. RETURN          &8001D  MJE_IFMODE "BASIC!:SEARCHFORWARD ""¤"":DELETE:JRF_IF "".¤.DELETENEXT.BASEMAP 0""":MJE_IFMODE "BASIC:SEARCHFORWARD ""$$"":DELETE:DELETE:JRF_IF "".$.DELETENEXT.BASEMAP 0"""
  101. Ascii chars    &80020-8007E    *&20
  102. DELETE        &8007F    DELETE
  103. <-|        &8001C    DELETE
  104. Ascii chars    &80080-800FF    *&80
  105. LEFT         &8018C    LEFT
  106. RIGHT        &8018D    RIGHT
  107. sLEFT        &8019C    SLEFT
  108. sRIGHT        &8019D    SRIGHT
  109. cLEFT        &801AC    SEARCHBACK "\((\|\<\)"
  110. cRIGHT        &801AD    SEARCHFORWARD "\()\|\>\)":LEFT:JRF_IF ".).NULL.RIGHT"
  111. kENTER        &80166    BASEMAP 1
  112. ESCAPE        &8001B    BASEMAP 1
  113. --8<--------
  114.